export function getDashed(rightNode, currentNode) {
  let clazz = 'qhParamDefault';
  if (rightNode.id === currentNode.id) {
    clazz = 'qhParamActive';
  }
  return clazz;
}

/**
 * 获取树形结构节点
 * @param data
 * @param key
 * @param callback
 * @returns {*}
 */
export function loopTreeNode(data, key, callback) {
  for (let i = 0; i < data.length; i++) {
    if (data[i].key === key) {
      return callback(data[i], i, data);
    }
    if (data[i].children) {
      loopTreeNode(data[i].children, key, callback);
    }
  }
}
